﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            const int n = 50;
            const int min = 1;
            const int max = 100;

            int[] numbers = new int[n];

            var rnd = new Random();


            for (int i = 0; i < numbers.Length; i++)
            {
                numbers[i] = rnd.Next(min, max);
            }

            foreach (var number in numbers)
            {
                Console.Write(number + " ");
            }


            long s = 0;

            foreach (var number in numbers)
            {
                s += number;
            }

            //s = numbers.Sum();
            //numbers.Max();
            //Array.Sort(numbers);
            //Console.WriteLine(s);
            Console.ReadKey();
        }
    }
}
